package com.maizhe.test;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

   /* @Component
    public class TimerTask {
        *//**
         * 每天22点30启动任务
         *//*
        @Scheduled(cron = "0 30 22 ? * *")
        public void test1()
        {
            System.out.println("job1 开始执行..."+new Date());
        }

        @Scheduled(cron = "0/5 * * * * ?")//每隔5秒隔行一次
        public void execute()
        {
            System.out.println("job2 开始执行");
        }
    }*/

public class TimerTask {

    public void execute(){


        System.out.println("Quartz的任务调度！！！"+(new Date()).toString());

    }

}
